package com.example.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName DemoController
 * @Description TODO
 * @Author: XMK
 * @Date: 2021/10/15 16:14
 * @Version: 1.0
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Value("${server.port:#{null}}")
    private String port;

    @GetMapping("/hello")
    public String hello() {
        return "hello  " + port;
    }
}
